<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="renderer" content="webkit">
	<link rel="icon" href="https://v3.bootcss.com/favicon.ico"/>
</head>
<body>
<div class="row" style="padding-top: 20px">
	<form class="form-horizontal" id="form_signin" action="/login" method="post">
		<div th:if="${loginError} != null">
			<div  class="alert alert-danger col-sm-offset-2 col-sm-10" role="alert" th:text="${loginError}"></div>
		</div>
	<div class="form-group">
		<label for="ipt_username" class="col-sm-2 control-label">用户名</label>
		<div class="col-sm-10">
			<input type="text" maxlength="10" name="username" class="form-control notEmpty" id="ipt_username" placeholder="用户名">
		</div>
	</div>
	<div class="form-group">
		<label for="ipt_password" class="col-sm-2 control-label">密码</label>
		<div class="col-sm-10">
			<input type="password" maxlength="20" name="password" class="form-control notEmpty" id="ipt_password" placeholder="密码">
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-10">
			<div class="checkbox">
				<label>
					<input class="form_control" type="checkbox" id="checkbox_rememberme" value="true" name="rememberMe">记住我
				</label>
			</div>
		</div>
	</div>

	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-10">
			<button type="button" onclick="signin()" class="btn btn-lg btn-primary btn-block">登录</button>
		</div>
	</div>
	</form>

	<h2>
		<div th:if="${user!=null}">
		<span th:text="${user.username}"></span>
		</div>
	</h2>
</div>
</body>
<script th:src="@{/js/jquery/jquery.min.js}"></script>
<script>
    function signin() {

        $("#form_signin").submit();

    }
</script>
</html>
